package cn.gson.work.model.service;

import cn.gson.work.model.mapper.DossierMapper;
import cn.gson.work.model.pojos.Dossier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class DossierService {
    @Autowired
    DossierMapper dom;
    public List<Dossier> findDossier(String rsid,String rsname,String rstate){
        return dom.findDossier(rsid,rsname,rstate);
    }
    public void addDossier(Dossier dossier){
        Dossier d=dom.findByRsid(dossier.getRsid());
        if(d==null)dom.addDossier(dossier);
    }
    public void editDossier(String rstate,long rsno){
        dom.editDossier(rstate,rsno);
    }
    public int delDossier(int id){
        return dom.delDossier(id);
    }
    public List<Dossier> findDossierAll(){
        return dom.findDossierAll();
    }
}
